home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
FGL402D.ZIP
/
EXBAS.ARJ
/
TEMP
/
08-14.BAS
< prev
next >
Wrap
BASIC Source File
|
1995-01-31
|
1KB
|
63 lines
REM $INCLUDE: 'fastgraf.bi'
DEFINT A-Z
CONST VBwidth = 640
CONST VBheight = 400
REM initialize the video environment
OldMode = FGgetmode
FGsetmode 19
FGvbinit
REM set up a 640x400 virtual buffer
SetMemStatus& = SETMEM(-(CLNG(VBwidth)*CLNG(VBheight)+16))
Handle = FGvballoc(VBwidth,VBheight)
IF Handle < 0 THEN
FGsetmode OldMode
FGreset
PRINT "Could not create the virtual buffer."
STOP
END IF
Status = FGvbopen(Handle)
REM draw a 320x200 rectangle in each virtual buffer quadrant
FGsetcolor 9
FGrect 0, 319, 0, 199
FGsetcolor 10
FGrect 320, 639, 0, 199
FGsetcolor 11
FGrect 0, 319, 200, 399
FGsetcolor 12
FGrect 320, 639, 200, 399
REM paste each rectangle to the 320x200 active video page
FGvbpaste 0, 319, 0, 199, 0, 199
FGwaitkey
FGvbpaste 320, 639, 0, 199, 0, 199
FGwaitkey
FGvbpaste 0, 319, 200, 399, 0, 199
FGwaitkey
FGvbpaste 320, 639, 200, 399, 0, 199
FGwaitkey
REM paste the center 320x200 subset of the virtual buffer
FGvbpaste 160, 479, 100, 299, 0, 199
FGwaitkey
REM close the virtual buffer
FGvbclose
FGvbfree Handle
REM restore original video mode and exit
FGsetmode OldMode
FGreset
END